<gm:page title="Youtube subscriptions" authenticate="false">

  <gm:data id="sub" 
     data="http://gdata.youtube.com/feeds/users/pmavrom/subscriptions" />     
  <gm:list id="mylist" data="${sub}" template="ytTemplate">
    <gm:handleEvent src="myList" event="select" execute="putData(event.entry);"/>
  </gm:list>  

  <gm:list id="main" />   

  <gm:template id="ytTemplate">
    <table>
      <tr repeat="true">
        <td><gm:text ref="atom:title"/></td>
        <td><gm:text id="feedlink" ref="gd:feedLink/href" /></td>
      </tr>
    </table>
  </gm:template>  
  
  
  <script>
    function putData(entry) {
       var urlGPath = new GPath("gd:feedLink/href");
       var urlString = urlGPath.getValue(entry);
       google.mashups.getObjectById('main').setData(urlString);
    }   
 </script>

</gm:page>
